<?php

namespace App\Model;

class ProjectsModel extends BaseModel
{
    protected $table = 'projects';

    protected $primaryKey='project_id';


    protected $fillable = [
        'project_name',
        'project_image_project_view_url',
        'project_text_info',
        'project_imgs',
        'category_id',
        'xiaoliang',
        'show_num',
        'project_price',
        'stock',
        'one_price',
        'two_price',
        'show',
        'buy_max_num',
        'content_value',
        'all_users_buy',
        'vip_price',
        'vip_price_2',
        'vip_price_3',
        'zhuanmai_price',
        'is_zhuanmai',
        'spread_rate_price',
        'me_rate_price',
        'shop_id',
        'shop_rate_price',
    ];



    public function categoryInfo(): \Illuminate\Database\Eloquent\Relations\HasOne
    {
        return $this->hasOne(CategoryModel::class,'category_id','category_id');
    }

}
